<?php
/**
 * Created by PhpStorm.
 * User: wangye
 * Date: 19-3-18
 * Time: 下午7:46
 */
$redis = new Redis();
$redis->connect('127.0.0.1','6379');

$res = $redis->exists('one');
var_dump($res);
$res = $redis->setnx('one','12312');
var_dump($res);

$redis->close();